package cn.lyjuan.payment.third.http.api.mq.enums;

import cn.lyjuan.payment.third.http.api.mq.msg.OrderPayMsg;
import com.hehewang.hhw.tdmq.enums.IMqType;
import com.hehewang.hhw.tdmq.handler.IHandler;

import java.lang.reflect.Type;

/**
 * @author chad
 */
public enum MqTypeEnum implements IMqType {
    /**
     * 订单
     */
    ORDER_PAY(505, "订单支付", OrderPayMsg.class, null),
    ;

    private int code;
    private String display;
    private Type dateType;
    private Class<? extends IHandler> handlerType;

    MqTypeEnum(int code, String display, Type dateType, Class<? extends IHandler> handlerType) {
        this.code = code;
        this.display = display;
        this.dateType = dateType;
        this.handlerType = handlerType;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String display() {
        return display;
    }


    @Override
    public Type getDataType() {
        return this.dateType;
    }

    @Override
    public Class<? extends IHandler> getHandlerType() {
        return this.handlerType;
    }

    @Override
    public String toName() {
        return this.name();
    }
}
